import os

from langchain_core.tools import tool

os.environ["ZHIPUAI_API_KEY"] = "97738d4998b8732d707daf91a2b1c56d.2y6VKEuOlidwHDpI"


@tool
def get_weather(location: str) -> int:
    """调用该工具获取某个城市的天气温度"""
    return 20


@tool
def square(num: str) -> int:
    """调用该工具获取某个数值的平方值"""
    return int(num) * int(num)

tools = [get_weather, square]
